package com.bup.gn.model;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "likes")
@Access(AccessType.FIELD)
public class Like extends BaseEntity {
    @Column(name = "lesson_id")
    private int lessonId;

    @Column(name = "liked")
    private Date liked;

    @ManyToOne
    @JoinColumn(name = "user_id")
    private User user;

    @ManyToOne
    @JoinColumn(name = "line_id")
    private Line line;

    public Date getLiked() {
        return liked;
    }

    public void setLiked(Date liked) {
        this.liked = liked;
    }

    public Line getLine() {
        return line;
    }

    public void setLine(Line line) {
        this.line = line;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public int getLessonId() {
        return lessonId;
    }

    public void setLessonId(int lessonId) {
        this.lessonId = lessonId;
    }
}
